function Vue(options) {
    this._data = options.data;

    for (let key of Object.keys(this._data)){
        Object.defineProperty(this, key,{
            get(){
                return this._data[key]
            },
            set(newVal) {
                this._data[key] = newVal
            }
        })
    }
}

const vm = new Vue({
    data : {
        count : 1,
        course : {
            type : 'easy',
            name: 'vue'
        }
    }
})
console.log(vm);